---@class Battle.AiBase
local AiBase = Battle.CreateClass("AiBase")
Battle.AiBase = AiBase
function AiBase:ctor(aiType)
    self.aiType = aiType
end
function AiBase:BaseCreate(actor)
    ---@type Battle.Entity
    self.actor = actor
    ---@type Battle.AiTree
    self.tree = nil
    self:OnCreate()
end
function AiBase:BaseDestroy()
    self:OnDestroy()
    self.actor = nil
    self.tree = nil
end

function AiBase:BaseUpdate(dt)
    self:Update(dt)
    if self.tree then
        self.tree:tick(dt)
    end
end
function AiBase:Stop()
    if self.tree then
        self.tree:Stop()
    end
end
--region override
function AiBase:OnCreate()

end
function AiBase:OnDestroy()

end
function AiBase:Update(dt)

end

--endregion override